﻿using System;

namespace DisplayDemo
{
    internal class TypeConvert
    {
        public static int ToInt32(string value)
        {
            if (String.IsNullOrEmpty(value))
                return 0;

            try
            {
                return Convert.ToInt32(value);
            }
            catch (FormatException)
            {
                return 0;
            }
        }
    }
}
